import 'package:json_annotation/json_annotation.dart';

part 'city_info_response.g.dart';


@JsonSerializable()
class CityInfoResponse extends Object {

  @JsonKey(name: 'country')
  Country country;

  @JsonKey(name: 'dataSourceUpdateTime')
  DataSourceUpdateTime dataSourceUpdateTime;

  @JsonKey(name: 'trend')
  List<Trend> trend;

  @JsonKey(name: 'provinceArray')
  List<ProvinceArray> provinceArray;

  CityInfoResponse(this.country,this.dataSourceUpdateTime,this.trend,this.provinceArray,);

  factory CityInfoResponse.fromJson(Map<String, dynamic> srcJson) => _$CityInfoResponseFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CityInfoResponseToJson(this);

}


@JsonSerializable()
class Country extends Object {

  @JsonKey(name: 'totalCured')
  int totalCured;

  @JsonKey(name: 'totalDeath')
  int totalDeath;

  @JsonKey(name: 'totalIncrease')
  int totalIncrease;

  @JsonKey(name: 'incDoubtful')
  int incDoubtful;

  @JsonKey(name: 'childStatistic')
  String childStatistic;

  @JsonKey(name: 'totalDoubtful')
  int totalDoubtful;

  @JsonKey(name: 'time')
  String time;

  @JsonKey(name: 'totalConfirmed')
  int totalConfirmed;

  Country(this.totalCured,this.totalDeath,this.totalIncrease,this.incDoubtful,this.childStatistic,this.totalDoubtful,this.time,this.totalConfirmed,);

  factory Country.fromJson(Map<String, dynamic> srcJson) => _$CountryFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CountryToJson(this);

}


@JsonSerializable()
class DataSourceUpdateTime extends Object {

  @JsonKey(name: 'updateTime')
  String updateTime;

  @JsonKey(name: 'dataSource')
  String dataSource;

  DataSourceUpdateTime(this.updateTime,this.dataSource,);

  factory DataSourceUpdateTime.fromJson(Map<String, dynamic> srcJson) => _$DataSourceUpdateTimeFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DataSourceUpdateTimeToJson(this);

}


@JsonSerializable()
class Trend extends Object {

  @JsonKey(name: 'day')
  String day;

  @JsonKey(name: 'sure_cnt')
  int sureCnt;

  @JsonKey(name: 'die_cnt')
  int dieCnt;

  @JsonKey(name: 'cure_cnt')
  int cureCnt;

  @JsonKey(name: 'doubt_cnt')
  int doubtCnt;

  @JsonKey(name: 'fullDay')
  int fullDay;

  Trend(this.day,this.sureCnt,this.dieCnt,this.cureCnt,this.doubtCnt,this.fullDay,);

  factory Trend.fromJson(Map<String, dynamic> srcJson) => _$TrendFromJson(srcJson);

  Map<String, dynamic> toJson() => _$TrendToJson(this);

}


@JsonSerializable()
class ProvinceArray extends Object {

  @JsonKey(name: 'totalCured')
  int totalCured;

  @JsonKey(name: 'totalDeath')
  int totalDeath;

  @JsonKey(name: 'totalIncrease')
  int totalIncrease;

  @JsonKey(name: 'cityArray')
  List<CityArray> cityArray;

  @JsonKey(name: 'childStatistic')
  String childStatistic;

  @JsonKey(name: 'totalDoubtful')
  int totalDoubtful;

  @JsonKey(name: 'totalConfirmed')
  int totalConfirmed;

  ProvinceArray(this.totalCured,this.totalDeath,this.totalIncrease,this.cityArray,this.childStatistic,this.totalDoubtful,this.totalConfirmed,);

  factory ProvinceArray.fromJson(Map<String, dynamic> srcJson) => _$ProvinceArrayFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ProvinceArrayToJson(this);

}


@JsonSerializable()
class CityArray extends Object {

  @JsonKey(name: 'totalCured')
  int totalCured;

  @JsonKey(name: 'totalDeath')
  int totalDeath;

  @JsonKey(name: 'totalIncrease')
  int totalIncrease;

  @JsonKey(name: 'childStatistic')
  String childStatistic;

  @JsonKey(name: 'totalDoubtful')
  int totalDoubtful;

  @JsonKey(name: 'totalConfirmed')
  int totalConfirmed;

  CityArray(this.totalCured,this.totalDeath,this.totalIncrease,this.childStatistic,this.totalDoubtful,this.totalConfirmed,);

  factory CityArray.fromJson(Map<String, dynamic> srcJson) => _$CityArrayFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CityArrayToJson(this);

}